{% extends "bootstrap/base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block title %}
登录
{% endblock %}

{% block styles %}
{{super()}}
<link rel="stylesheet" href="{{url_for('.static', filename='signin.css')}}">
{% endblock %}

{% block content %}
    {% include "nav.html" %}
    <div class="container">
      <form class="form-signin" method="POST" action="/login">
        {% if error %}
        <div class="alert alert-danger" role="alert" style="margin-top:20px">
            {{ error }}
        </div>
        {% endif %}
        <h2 class="form-signin-heading">登录</h2>
        {{ form.hidden_tag() }}
        {{ wtf.form_field(form.username) }}
        {{ wtf.form_field(form.password) }}
        <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
      </form>

    </div> <!-- /container -->
{% endblock %}
